SpatialStream® Code Examples

Geocode With Highlight Geometry

This example uses the GetGeocode functional component, and illustrates one of the interactive mapping features you can implement using the full parcel geometry results from the GetGeocode functional component and the “geo” parameter. Here, the address, city, state and zipcode of a location are passed into the geocoding engine using GetGeocode, and the full parcel geometry is asked for in return by setting the includegeo parameter to true. The full parcel geometry returned is then highlighted on the map using traditional Bing Maps™ objects.

GetGeocode

var tileSource = new Microsoft.Maps.TileSource({
uriConstructor: 'http://t{
subdomain
}.spatialstream.com/getMap.aspx?layers=DMP_LICENSE/ParcelTiles&tileid={
quadkey
}'
});
// Construct the layer using the tile source
tilelayer = new Microsoft.Maps.TileLayer({
mercator: tileSource
});
// Push the tile layer to the map
map.entities.push(tilelayer);

//----------------

var url = "GetGeocode.aspx?";
url += "&address=" + document.getElementById("address").value;
url += "&city=" + document.getElementById("city").value;
url += "&state=" + document.getElementById("state").value;
url += "&zip=" + document.getElementById("zip").value;
url += "&fields=*,[resource](*)&v=latest";
url += "&datasource=PARCELS,STREET_CENTERLINE";

Dmp.Env.Connections["SS"].getJson(url, success, failure);


Run Sample   View Video   Back To Index